package com.qiaoas.springbootmybatis.controller;


import com.qiaoas.springbootmybatis.bean.User;
import com.qiaoas.springbootmybatis.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class indexController {

    @Autowired
    private UserService userService;

    @RequestMapping("/")
    String index(){
        return "Hello Spring Boot MyBatis";
    }

    @RequestMapping("getuser")
    User getUser(){
        return this.userService.getUser("qiaoansheng");
    }

}
